home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: flugga.dcs.ed.ac.uk!chp
- From: chp@dcs.ed.ac.uk (Charles Philpott)
- Subject: Re: The easiest C Program ever!!
- X-Nntp-Posting-Host: flugga.dcs.ed.ac.uk
- Message-ID: <DMEJt5.6z0.0.staffin.dcs.ed.ac.uk@dcs.ed.ac.uk>
- Sender: chp@flugga.dcs.ed.ac.uk (Charles Philpott)
- Organization: Department of Computer Science, University of Edinburgh
- X-Newsreader: xrn 8.00
- References: <311.6610T1012T295@in.net>
- Date: Wed, 7 Feb 1996 10:58:14 GMT
-
- In article <311.6610T1012T295@in.net>, mave@in.net (John J. Maver, Jr.) writes:
- >
- >
- > How do I do a "Press enter to continue" in plain old ANSI C? I have
- > got SAS6.56.
- >
- > My guess was:
- >
- >
- > printf("Please press enter to continue\n");
- > while ((c=getchar()) != '\n' )
- > ;
- >
- >
- > However, it never gets the character.
-
- Works just fine for me, using ANSI C on UNIX. I take it you've declared c as
- an int or char?
-
- Charles
-